home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / wics.zip / DEMO.CPP < prev    next >
C/C++ Source or Header  |  1993-03-05  |  2KB  |  75 lines

  1. //==============================================================================================
  2. //
  3. //    WICS Demonstration Application
  4. //    Version 1.00
  5. //
  6. //    DEMO.CPP main application code file
  7. //    February 1993
  8. //
  9. //    Copyright (C) 1993  Microdyne Development Technologies
  10. //
  11. //==============================================================================================
  12. //
  13. //    Abstract:
  14. //
  15. //    This is a demonstration program to show off the WICS (Windows Interface Construction Set) custom controls and
  16. //    Borland Style Common Dialogs.
  17. //
  18. //==============================================================================================        
  19.  
  20. #include <owl.h>
  21. #include <wics.h>
  22. #include <demorc.h>
  23. #include <demo.h>
  24.  
  25. //-------------------------------------------------------------------------------------
  26. // Construct the TDemoApp's MainWindow data member
  27. //-------------------------------------------------------------------------------------
  28.  
  29. void TDemoApp::InitMainWindow()
  30. {
  31.     MainWindow = new TDemoWindow("WICS Demo", DEMO_MENU);
  32. }
  33.  
  34. //-------------------------------------------------------------------------------------
  35. //    Initialize each MS-Windows application instance.
  36. //-------------------------------------------------------------------------------------
  37.  
  38. void TDemoApp::InitInstance()
  39. {
  40.     TApplication::InitInstance();
  41. }
  42.  
  43. //-------------------------------------------------------------------------------------
  44. //    Initialize the application.
  45. //-------------------------------------------------------------------------------------
  46.  
  47. void TDemoApp::InitApplication()
  48. {
  49.     TApplication::InitApplication();
  50.  
  51.     idHelpMessage     = RegisterWindowMessage (HELPMSGSTRING);
  52.     idFindTextMessage = RegisterWindowMessage (FINDMSGSTRING);
  53. }
  54.  
  55. //-------------------------------------------------------------------------------------
  56. //    Main program loop for LIDB Application.
  57. //-------------------------------------------------------------------------------------
  58.  
  59. int PASCAL WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
  60. {
  61.     HINSTANCE hLib1 = LoadLibrary( "BWCC.DLL" );
  62.     HINSTANCE hLib2 = LoadLibrary( "WICSCC.DLL" );
  63.     HINSTANCE hLib3 = LoadLibrary( "WCD.DLL" );
  64.  
  65.     TDemoApp DemoApp ("WICS Demo", hInstance, hPrevInstance, lpCmdLine, nCmdShow);
  66.     DemoApp.Run();
  67.  
  68.     FreeLibrary (hLib1);
  69.     FreeLibrary (hLib2);
  70.     FreeLibrary (hLib3);
  71.  
  72.     return DemoApp.Status;
  73. }
  74.  
  75.